From: Po Lu Date: Mon, 6 Dec 2021 01:40:38 +0000 (+0800) Subject: Fix jittering when precision scrolling over images X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~16^2~4050^2~38 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=e449f62a79f9acafd0b29df63e1cc177689b4407;p=emacs.git Fix jittering when precision scrolling over images * lisp/pixel-scroll.el (pixel-scroll-precision-initial-velocity-factor): Default to nil. (pixel-scroll-precision-scroll-down-page): Always set window start. --- diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el index 77229844246..2e09f9af2d4 100644 --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el @@ -133,7 +133,7 @@ This is only effective if supported by your mouse or touchpad." :type 'float :version "29.1") -(defcustom pixel-scroll-precision-large-scroll-height 70 +(defcustom pixel-scroll-precision-large-scroll-height nil "Pixels that must be scrolled before an animation is performed. Nil means to not interpolate such scrolls." :group 'mouse @@ -441,14 +441,13 @@ the height of the current window." (set-window-vscroll nil (+ (window-vscroll nil t) delta) t) - (unless (eq (window-start) desired-start) - (set-window-start nil (if (zerop (window-hscroll)) - desired-start - (save-excursion - (goto-char desired-start) - (beginning-of-visual-line) - (point))) - t)) + (set-window-start nil (if (zerop (window-hscroll)) + desired-start + (save-excursion + (goto-char desired-start) + (beginning-of-visual-line) + (point))) + t) (set-window-vscroll nil desired-vscroll t)) (if (and (or (< (point) next-pos)) (let ((pos-visibility (pos-visible-in-window-p next-pos nil t)))